package com.hb.web.controller;

import com.hb.bussiness.dto.CommonResponse;
import com.hb.bussiness.service.ESSearchService;
import com.hb.bussiness.service.impl.ESQueryServerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author
 * @date:2023/4/26 17:53
 */

@RestController
@RequestMapping("/es")
public class EsController {

    @Autowired
    private ESQueryServerImpl esQueryServer;

    @Autowired
    private ESSearchService esSearchService;

    @GetMapping("/tt")
    public String tt() {
        CommonResponse word = esQueryServer.highLightQuery(10, 1, "word");
        esQueryServer.completionSuggestionQuery("word");
        return (String) word.getData();
    }


}
